<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use App\Models\Prize;

class PrizeSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $prizes = [
            [
                'name' => 'iPhone 15',
                'probability' => 0.0001, // 0.01%的中奖概率
                'stock' => 1,
                'status' => 1,
            ],
            [
                'name' => '100元现金红包',
                'probability' => 0.001, // 0.1%的中奖概率
                'stock' => 10,
                'status' => 1,
            ],
            [
                'name' => '10元现金红包',
                'probability' => 0.01, // 1%的中奖概率
                'stock' => 100,
                'status' => 1,
            ],
            [
                'name' => '1元现金红包',
                'probability' => 0.1, // 10%的中奖概率
                'stock' => 1000,
                'status' => 1,
            ],
        ];

        foreach ($prizes as $prize) {
            Prize::create($prize);
        }
    }
} 